// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Catalogrule generated by hbm2java
 */
@Entity
@Table(name = "catalogrule", catalog = "magento")
public class Catalogrule implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private Integer ruleId;
	private String name;
	private String description;
	private Date fromDate;
	private Date toDate;
	private String customerGroupIds;
	private short isActive;
	private String conditionsSerialized;
	private String actionsSerialized;
	private short stopRulesProcessing;
	private int sortOrder;
	private String simpleAction;
	private BigDecimal discountAmount;
	private String websiteIds;
	private short subIsEnable;
	private String subSimpleAction;
	private BigDecimal subDiscountAmount;
	private Set catalogruleGroupWebsites = new HashSet(0);
	private Set catalogruleProducts = new HashSet(0);

	public Catalogrule() {
	}

	public Catalogrule(short isActive, short stopRulesProcessing,
			int sortOrder, BigDecimal discountAmount, short subIsEnable,
			BigDecimal subDiscountAmount) {
		this.isActive = isActive;
		this.stopRulesProcessing = stopRulesProcessing;
		this.sortOrder = sortOrder;
		this.discountAmount = discountAmount;
		this.subIsEnable = subIsEnable;
		this.subDiscountAmount = subDiscountAmount;
	}

	public Catalogrule(String name, String description, Date fromDate,
			Date toDate, String customerGroupIds, short isActive,
			String conditionsSerialized, String actionsSerialized,
			short stopRulesProcessing, int sortOrder, String simpleAction,
			BigDecimal discountAmount, String websiteIds, short subIsEnable,
			String subSimpleAction, BigDecimal subDiscountAmount,
			Set catalogruleGroupWebsites, Set catalogruleProducts) {
		this.name = name;
		this.description = description;
		this.fromDate = fromDate;
		this.toDate = toDate;
		this.customerGroupIds = customerGroupIds;
		this.isActive = isActive;
		this.conditionsSerialized = conditionsSerialized;
		this.actionsSerialized = actionsSerialized;
		this.stopRulesProcessing = stopRulesProcessing;
		this.sortOrder = sortOrder;
		this.simpleAction = simpleAction;
		this.discountAmount = discountAmount;
		this.websiteIds = websiteIds;
		this.subIsEnable = subIsEnable;
		this.subSimpleAction = subSimpleAction;
		this.subDiscountAmount = subDiscountAmount;
		this.catalogruleGroupWebsites = catalogruleGroupWebsites;
		this.catalogruleProducts = catalogruleProducts;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "rule_id", unique = true, nullable = false)
	public Integer getRuleId() {
		return this.ruleId;
	}

	public void setRuleId(Integer ruleId) {
		this.ruleId = ruleId;
	}

	@Column(name = "name")
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 65535)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "from_date", length = 10)
	public Date getFromDate() {
		return this.fromDate;
	}

	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "to_date", length = 10)
	public Date getToDate() {
		return this.toDate;
	}

	public void setToDate(Date toDate) {
		this.toDate = toDate;
	}

	@Column(name = "customer_group_ids", length = 65535)
	public String getCustomerGroupIds() {
		return this.customerGroupIds;
	}

	public void setCustomerGroupIds(String customerGroupIds) {
		this.customerGroupIds = customerGroupIds;
	}

	@Column(name = "is_active", nullable = false)
	public short getIsActive() {
		return this.isActive;
	}

	public void setIsActive(short isActive) {
		this.isActive = isActive;
	}

	@Column(name = "conditions_serialized", length = 16777215)
	public String getConditionsSerialized() {
		return this.conditionsSerialized;
	}

	public void setConditionsSerialized(String conditionsSerialized) {
		this.conditionsSerialized = conditionsSerialized;
	}

	@Column(name = "actions_serialized", length = 16777215)
	public String getActionsSerialized() {
		return this.actionsSerialized;
	}

	public void setActionsSerialized(String actionsSerialized) {
		this.actionsSerialized = actionsSerialized;
	}

	@Column(name = "stop_rules_processing", nullable = false)
	public short getStopRulesProcessing() {
		return this.stopRulesProcessing;
	}

	public void setStopRulesProcessing(short stopRulesProcessing) {
		this.stopRulesProcessing = stopRulesProcessing;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

	@Column(name = "simple_action", length = 32)
	public String getSimpleAction() {
		return this.simpleAction;
	}

	public void setSimpleAction(String simpleAction) {
		this.simpleAction = simpleAction;
	}

	@Column(name = "discount_amount", nullable = false, precision = 12, scale = 4)
	public BigDecimal getDiscountAmount() {
		return this.discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	@Column(name = "website_ids", length = 65535)
	public String getWebsiteIds() {
		return this.websiteIds;
	}

	public void setWebsiteIds(String websiteIds) {
		this.websiteIds = websiteIds;
	}

	@Column(name = "sub_is_enable", nullable = false)
	public short getSubIsEnable() {
		return this.subIsEnable;
	}

	public void setSubIsEnable(short subIsEnable) {
		this.subIsEnable = subIsEnable;
	}

	@Column(name = "sub_simple_action", length = 32)
	public String getSubSimpleAction() {
		return this.subSimpleAction;
	}

	public void setSubSimpleAction(String subSimpleAction) {
		this.subSimpleAction = subSimpleAction;
	}

	@Column(name = "sub_discount_amount", nullable = false, precision = 12, scale = 4)
	public BigDecimal getSubDiscountAmount() {
		return this.subDiscountAmount;
	}

	public void setSubDiscountAmount(BigDecimal subDiscountAmount) {
		this.subDiscountAmount = subDiscountAmount;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogrule")
	public Set getCatalogruleGroupWebsites() {
		return this.catalogruleGroupWebsites;
	}

	public void setCatalogruleGroupWebsites(Set catalogruleGroupWebsites) {
		this.catalogruleGroupWebsites = catalogruleGroupWebsites;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogrule")
	public Set getCatalogruleProducts() {
		return this.catalogruleProducts;
	}

	public void setCatalogruleProducts(Set catalogruleProducts) {
		this.catalogruleProducts = catalogruleProducts;
	}

}
